<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <button>0</button>
  <!-- 回调地狱 -->
  <!-- 多层回调函数的嵌套效果 -->
  <!-- 缺点:维护性太差,改一个动一发而牵牵全身 -->
  <script>
    setTimeout(function () {
      console.log(1)
      setTimeout(function () {
        console.log(2)
        setTimeout(function () {
          console.log(3)
        }, 1000)
      }, 2000)
    }, 3000)

  </script>
</body>

</html>